if(!jsx3.lang.Class.forName("tibco.admin.environments.baseInfo.BaseInfo")) {

    jsx3.lang.Class.defineClass("tibco.admin.environments.baseInfo.BaseInfo",
            jsx3.gui.Block,
            null,
            function (baseInfo) {
				baseInfo.prototype.isEditmode = false;

                baseInfo.prototype.loadDetails = function(strID, strNodeID, strNodeName) {
					if(strID == "application"){
						//this.getDescendantOfName("btnEdit_56M").setDisplay(jsx3.gui.Block.DISPLAYBLOCK, true);
					}
                }

				baseInfo.prototype.callBtnEditOnclick = function() {
					this.isEditmode = true;
                    if(!this.pluginObj.isInEditMode()) {
                        this.pluginObj.beginEditMode();
                    }
                    else {
                        this.pluginObj.endEditMode();
                    }
					this.loadBtnStatus();
					baseInfo.visitTextbox(
						function(textBox, label) {
							if(textBox && label) {
								textBox.setDisplay(jsx3.gui.Block.DISPLAYBLOCK, true);
								label.setDisplay(jsx3.gui.Block.DISPLAYNONE, true);
							}
						}
					) 
				}

				baseInfo.prototype.callBtnSaveOnclick = function() {
					if(!this.pluginObj.isInEditMode()) {
                        this.pluginObj.beginEditMode();
                    }
                    else {
                        this.pluginObj.endEditMode();
                    }
					this.isEditmode = false;
					this.loadBtnStatus();
					baseInfo.visitTextbox(
						function(textBox, label) {
							if(textBox && label) {
								textBox.setDisplay(jsx3.gui.Block.DISPLAYNONE, true);
								label.setDisplay(jsx3.gui.Block.DISPLAYBLOCK, true);
							}
						}
					)
                }

				baseInfo.prototype.callBtnCancelOnclick = function() {
                    if(!this.pluginObj.isInEditMode()) {
                        this.pluginObj.beginEditMode();
                    }
                    else {
                        this.pluginObj.endEditMode();
                    }
					this.isEditmode = false;
					this.loadBtnStatus();
					baseInfo.visitTextbox(
						function(textBox, label) {
							if(textBox && label) {
								textBox.setDisplay(jsx3.gui.Block.DISPLAYNONE, true);
								label.setDisplay(jsx3.gui.Block.DISPLAYBLOCK, true);
							}
						}
					)
				}

				baseInfo.prototype.loadBtnStatus = function() {
					if(this.isEditmode){
						this.getDescendantOfName("btnEdit_56M").setDisplay(jsx3.gui.Block.DISPLAYNONE, true);
						this.getDescendantOfName("btnSave_56M").setDisplay(jsx3.gui.Block.DISPLAYBLOCK, true);
						this.getDescendantOfName("btnCancel_56M").setDisplay(jsx3.gui.Block.DISPLAYBLOCK, true);
					}else{
						this.getDescendantOfName("btnEdit_56M").setDisplay(jsx3.gui.Block.DISPLAYBLOCK, true);
						this.getDescendantOfName("btnSave_56M").setDisplay(jsx3.gui.Block.DISPLAYNONE, true);
						this.getDescendantOfName("btnCancel_56M").setDisplay(jsx3.gui.Block.DISPLAYNONE, true);
					}
				}

				baseInfo.visitTextbox = function(fctn) {
					var root = tibco.admin.Main.getServer().getRootBlock();
					var arr = root.findDescendants(function(o) {return o.getName().substr(0, 3) == 'txt' }, true, true)
					for(var i = 0; i < arr.length; i++) { 
						var name = arr[i].getName();
						var label = root.getDescendantOfName("lbl" + name.substr(3, (name.indexOf('_') - 3)) + "Value_" + name.substr(name.indexOf('_') + 1));
						fctn(arr[i], label);
					}
				}

            })
}